/*
CREATE TABLE "base_rate" (
  "sequence_nbr" text(20) NOT NULL,
  "kind_num" integer(10),
  "type_name" text(50),
  "rate_code" text(200),
  "project_type" text(50),
  "library_code" text(50),
  "management_fee1" real(16,6),
  "management_fee2" real(16,6),
  "management_fee3" real(16,6),
  "profit1" real(16,6),
  "profit2" real(16,6),
  "profit3" real(16,6),
  "gfee_rate" real(16,6),
  "awf_rate_max" real(16,6),
  "awf_rate_min" real(16,6),
  "tax_rates" real(16,6),
  "rec_user_code" text(32),
  "rec_status" text(4),
  "rec_date" integer(20),
  "extend1" text(64),
  "extend2" text(64),
  "extend3" text(64),
  "description" text(255),
  "agency_code" text(64),
  "product_code" text(64),
  PRIMARY KEY ("sequence_nbr")
);
*/

use rbatis::crud;
use serde::{Deserialize, Serialize};

#[derive(Debug, Serialize, Deserialize)]
pub struct BaseRate {
    pub sequence_nbr: String,
    pub kind_num: Option<i32>,
    pub type_name: Option<String>,
    pub rate_code: Option<String>,
    pub project_type: Option<String>,
    pub library_code: Option<String>,
    pub management_fee1: Option<f64>,
    pub management_fee2: Option<f64>,
    pub management_fee3: Option<f64>,
    pub profit1: Option<f64>,
    pub profit2: Option<f64>,
    pub profit3: Option<f64>,
    pub gfee_rate: Option<f64>,
    pub awf_rate_max: Option<f64>,
    pub awf_rate_min: Option<f64>,
    pub tax_rates: Option<f64>,
    pub rec_user_code: Option<String>,
    pub rec_status: Option<String>,
    pub rec_date: Option<String>,
    pub extend1: Option<String>,
    pub extend2: Option<String>,
    pub extend3: Option<String>,
    pub description: Option<String>,
    pub agency_code: Option<String>,
    pub product_code: Option<String>,
}
crud!(BaseRate {}, "base_rate");
